abstract class $LIST{ETP} < $ARR{ETP}, $STR
****
An extensible array abstraction. Similar to a list abstraction, but keys are integers after an insert all other keys may have changed Inherits: size: INT; aget(i: INT): ETP aset(ind: INT, e: ETP) has_ind(i: INT): BOOL; elt!: ETP; ind!: INT set_view: $RO_SET{ETP};


Ancestors
$STR $ARR{_} $RO_ARR{_} $CONTAINER{_}
$ELT{_} $ELT

Descendants
LIST{_} A_LIST{_}



Public


Features
append(e: ETP);
**** Concatenate "e" onto the end of the array
append_all(l: $CONTAINER{ETP});
**** post has(l.elt!) Append the elements of "l" onto the end of the current array
copy: SAME;
**** Redefined to narrow the return type
equals(a: $RO_ARR{ETP}): BOOL;
insert_after(ind: INT, val: ETP);
**** pre valid_ind(ind) post valid_ind(result); Insert the value "val" after the index "ind" in the list The indices of all subseqeuent elements will be shifted up by 1
insert_all_after(ind: INT, val: $CONTAINER{ETP});
**** Insert the elements of the list in order after the element at index "ind". The indices of all subsequent elements will be shifted upward
insert_all_before(ind: INT, val: $CONTAINER{ETP});
**** Insert the elements of "val" in order, before "ind". The indices of it and all subsequent elements will be shifted upward
insert_before(ind: INT,val: ETP);
**** Insert the value "val" before the index "ind" in the list The indices of all subsequent elements will be shifted upward

The Sather Home Page